<!DOCTYPE html
    PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en">
    <head>
        <meta charset="utf-8" />
        <title>Easter Calendar Facebook App</title>
        <meta name="description" content="Easter Calendar App" />
        <meta name="viewport" content="width=device-width" />
        <link href="<?php echo $view->layoutUrl; ?>assets/css/bootstrap.css" media="screen" rel="stylesheet" type="text/css" />
        <link href="<?php echo $view->layoutUrl; ?>assets/css/bootstrap-responsive.css" media="screen" rel="stylesheet" type="text/css" />
        <link href="<?php echo $view->layoutUrl; ?>assets/css/jquery.fancybox.css" media="screen" rel="stylesheet" type="text/css" />
        <link href="<?php echo $view->layoutUrl; ?>assets/css/uniform.default.css" media="screen" rel="stylesheet" type="text/css" />
        <link href="<?php echo $view->layoutUrl; ?>assets/css/bootstrap.datepicker.css" media="screen" rel="stylesheet" type="text/css" />
        <link href="<?php echo $view->layoutUrl; ?>assets/css/jquery.cleditor.css" media="screen" rel="stylesheet" type="text/css" />
        <link href="<?php echo $view->layoutUrl; ?>assets/css/jquery.plupload.queue.css" media="screen" rel="stylesheet" type="text/css" />
        <link href="<?php echo $view->layoutUrl; ?>assets/css/jquery.tagsinput.css" media="screen" rel="stylesheet" type="text/css" />
        <link href="<?php echo $view->layoutUrl; ?>assets/css/jquery.ui.plupload.css" media="screen" rel="stylesheet" type="text/css" />
        <link href="<?php echo $view->layoutUrl; ?>assets/css/chosen.css" media="screen" rel="stylesheet" type="text/css" />
        <link href="<?php echo $view->layoutUrl; ?>assets/css/jquery.jgrowl.css" media="screen" rel="stylesheet" type="text/css" />
        <link href="<?php echo $view->layoutUrl; ?>assets/css/style.css" media="screen" rel="stylesheet" type="text/css" />
        <link href="<?php echo $view->layoutUrlLocal; ?>assets/css/global.css" media="screen" rel="stylesheet" type="text/css" />        
    </head>
    <body>
        <div class="topbar">
            <div class="container-fluid">
                <a href="?action=index" class='company'>Easter Calendar Facebook App Administration</a>
                <form action="#">
                    <input type="text" value="Search here..." />
                </form>


                <ul class='mini'>
                    <li>
                        <a href="?action=logout">
                            <img src="<?php echo $view->layoutUrl; ?>assets/img/icons/fugue/control-power.png" alt="" />
                            Logout
                        </a>
                    </li>
                </ul>
                <div style="float:right; color: white;margin-top: 16px;">
                    Welcome <a href="#">
                        <?php echo $view->user['name']; ?>
                    </a> 
                    (
                    <a href="<?php echo $view->iframe_url; ?>" target="_blank">Preview app</a>
                    )
                </div>
            </div>
        </div>
        <div class="main">
            <div class="navi">
                <ul class='main-nav'>
                    
                    <li class="<?php if ($view->action == "index") { ?>active<?php } ?>">
                        <a href="?action=index" class='light'>
                            <div class="ico">
                                <i class="icon-home icon-white"></i>
                            </div> Dashboard
                        </a>                     
                    </li>
                    
                    <li class="<?php if(in_array($view->action, array('generalsetting','frontendsetup','contestsetup','footersetting','languagesetting'))){?>active<?php } ?> open">
                        <a href="?action=index" class='light toggle-collapsed'>
                            <div class="ico">
                                <i class="icon-th-large icon-white"></i>
                            </div> Settings <img src="<?php echo $view->layoutUrl; ?>assets/img/toggle-subnav-up-white.png" alt="" />
                        </a>
                        <ul class='collapsed-nav'>                            
                            <li<?php if ($view->action == "generalsetting") { ?> class="active" <?php } ?>><a href="?action=generalsetting"> General Settings </a></li>
                            <li<?php if ($view->action == "editcalendar") { ?> class="active" <?php } ?>><a href="?action=editcalendar"> Calendar Settings </a></li>
                            <li<?php if ($view->action == "frontendsetup") { ?> class="active" <?php } ?>><a href="?action=frontendsetup"> Front-end Settings </a></li>                             
                            <li<?php if ($view->action == "languagesetting") { ?> class="active" <?php } ?>><a href="?action=languagesetting">Language settings</a></li>                                                                                                                                                                                                  
                        </ul>
                    </li>
                    <li class="<?php if ($view->action == "reporting") { ?>active<?php } ?>">
                        <a href="?action=reporting" class='light'>
                            <div class="ico">
                                <i class="icon-signal icon-white"></i>
                            </div> Reporting
                        </a>                     
                    </li>
                    <li class="<?php if ($view->action == "apppublish") { ?>active<?php } ?>">
                        <a href="?action=apppublish" class='light'>
                            <div class="ico">
                                <i class="icon-upload icon-white"></i>
                            </div> Publishing
                        </a>                     
                    </li>
                    <?php if ($view->user['group_id'] == 1) { ?>
                    <li class="<?php if(in_array($view->action, array('manageuser'))){?>active<?php } ?> open"><a href="#" class='light toggle-collapsed'>
                            <div class="ico">
                                <i class="icon-lock icon-white"></i>
                            </div> Admin Tools <img src="<?php echo $view->layoutUrl; ?>assets/img/toggle-subnav-up-white.png" alt="" />
                        </a>
                        <ul class='collapsed-nav'>
                            <li<?php if ($view->action == "manageuser") { ?> class="active" <?php } ?>>
                                <a href="?action=manageuser">Manage users</a>
                            </li>
                            <!--
                            <li<?php if ($view->action == "tools") { ?> class="active" <?php } ?>>
                                <a href="?action=tools">System tools</a>
                            </li>
                            <li<?php if ($view->action == "statistic") { ?> class="active" <?php } ?>>
                                <a href="?action=statistic">Quick statistic</a>
                            </li>
                            -->
                        </ul>
                    </li>
                    <?php } ?>
                    
                     <?php if ($view->user['group_id'] == 2) { ?>
                    <li class="<?php if(in_array($view->action, array('manageuser', 'createnewuser'))){?>active<?php } ?> open"><a href="#" class='light toggle-collapsed'>
                            <div class="ico">
                                <i class="icon-lock icon-white"></i>
                            </div> Sales Tools <img src="<?php echo $view->layoutUrl; ?>assets/img/toggle-subnav-up-white.png" alt="" />
                        </a>
                        <ul class='collapsed-nav'>
                            <li<?php if ($view->action == "manageuser") { ?> class="active" <?php } ?>>
                                <a href="?action=manageuser">Manage users</a>
                            </li> 
                            <?php if($view->can_create_user){ ?>
                            <li<?php if ($view->action == "createnewuser") { ?> class="active" <?php } ?>>
                                <a href="?action=createnewuser">Create user</a>
                            </li> 
                            <?php } ?>
                        </ul>
                    </li>
                    <?php } ?>
                    
                    <li class="<?php if(in_array($view->action, array('loginsecurity'))){?>active<?php } ?> open"><a href="#" class='light toggle-collapsed'>
                            <div class="ico">
                                <i class="icon-lock icon-white"></i>
                            </div> Account <img src="<?php echo $view->layoutUrl; ?>assets/img/toggle-subnav-up-white.png" alt="" />
                        </a>
                        <ul class='collapsed-nav'>
                            <li<?php if ($view->action == "loginsecurity") { ?> class="active" <?php } ?>>
                                <a href="?action=loginsecurity">Login Security</a>
                            </li>                        
                        </ul>
                    </li>
                    
                </ul>
            </div>

            <div class="container-fluid">
                <div class="content">
                    <!-- start of content -->
                    <?php echo $view->view_content; ?>
                    <!-- end of content -->
                </div>
                <center style="padding-bottom: 5px;">Powered by <a target="_blank" href="http://slopetracker.no">http://slopetracker.no</a> and <a target="_blank" href="http://nordicmedia.no">http://nordicmedia.no</a></center>
            </div>
        </div>

        <script type="text/javascript" src="<?php echo $view->layoutUrl; ?>assets/js/jquery.js"></script>
        <script type="text/javascript" src="<?php echo $view->layoutUrl; ?>assets/js/less.js"></script>
        <script type="text/javascript" src="<?php echo $view->layoutUrl; ?>assets/js/bootstrap.min.js"></script>
        <script type="text/javascript" src="<?php echo $view->layoutUrl; ?>assets/js/jquery.peity.js"></script>
        <script type="text/javascript" src="<?php echo $view->layoutUrl; ?>assets/js/jquery.uniform.min.js"></script>
        <script type="text/javascript" src="<?php echo $view->layoutUrl; ?>assets/js/bootstrap.timepicker.js"></script>
        <script type="text/javascript" src="<?php echo $view->layoutUrl; ?>assets/js/bootstrap.datepicker.js"></script>
        <script type="text/javascript" src="<?php echo $view->layoutUrl; ?>assets/js/chosen.jquery.min.js"></script>
        <script type="text/javascript" src="<?php echo $view->layoutUrl; ?>assets/js/plupload/plupload.full.js"></script>
        <script type="text/javascript" src="<?php echo $view->layoutUrl; ?>assets/js/plupload/jquery.plupload.queue/jquery.plupload.queue.js"></script>
        <script type="text/javascript" src="<?php echo $view->layoutUrl; ?>assets/js/jquery.cleditor.min.js"></script>
        <script type="text/javascript" src="<?php echo $view->layoutUrl; ?>assets/js/jquery.inputmask.min.js"></script>
        <script type="text/javascript" src="<?php echo $view->layoutUrl; ?>assets/js/jquery.tagsinput.min.js"></script>
        <script type="text/javascript" src="<?php echo $view->layoutUrl; ?>assets/js/jquery.mousewheel.js"></script>
        <script type="text/javascript" src="<?php echo $view->layoutUrl; ?>assets/js/jquery.textareaCounter.plugin.js"></script>
        <script type="text/javascript" src="<?php echo $view->layoutUrlLocal; ?>assets/js/jquery.cleditor.youtube.js"></script>        
        <script type="text/javascript" src="<?php echo $view->layoutUrl; ?>assets/js/ui.spinner.js"></script>
        <script type="text/javascript" src="<?php echo $view->layoutUrl; ?>assets/js/jquery.fancybox.js"></script>
        <script type="text/javascript" src="<?php echo $view->layoutUrl; ?>assets/js/jquery.flot.js"></script>
        <script type="text/javascript" src="<?php echo $view->layoutUrl; ?>assets/js/jquery.flot.pie.js"></script>
        <script type="text/javascript" src="<?php echo $view->layoutUrl; ?>assets/js/jquery.dataTables.min.js"></script>
        <script type="text/javascript" src="<?php echo $view->layoutUrl; ?>assets/js/jquery.dataTables.bootstrap.js"></script>
        <script type="text/javascript" src="<?php echo $view->layoutUrl; ?>assets/js/jquery.color.js"></script>
        <script type="text/javascript" src="<?php echo $view->layoutUrl; ?>assets/js/jquery.flot.resize.js"></script>
        <script type="text/javascript" src="<?php echo $view->layoutUrl; ?>assets/js/jquery.flot.orderBars.js"></script>
        <script type="text/javascript" src="<?php echo $view->layoutUrl; ?>assets/js/jquery.validate.min.js"></script>
        <script type="text/javascript" src="<?php echo $view->layoutUrlLocal; ?>assets/js/custom.js"></script>
        <script type="text/javascript" src="<?php echo $view->layoutUrlLocal; ?>assets/js/global.js"></script>
        <!-- block UI -->

        <script type="text/javascript" src="<?php echo $view->layoutUrl; ?>libs/jquery.blockUI.js"></script>
    </body>
</html>